@charset "utf-8";
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
/*======================*/

html {
    font-family: 'Open Sans', sans-serif;
    margin: 0;
    box-sizing: border-box;
}

/*=========== GRID SITE ===========*/

#site {
    display: grid;
    grid-template-columns: 1;
    grid-template-rows: 1fr auto 0.25fr;
}

#cabecalho {
    grid-column-start: 1;
    grid-column-end: 1;
    grid-row-start: 1;
    grid-row-end: 2;
}

#conteudo {
    grid-column-start: 1;
    grid-column-end: 1;
    grid-row-start: 2;
    grid-row-end: 3;
}

#rodape {
    grid-column-start: 1;
    grid-column-end: 1;
    grid-row-start: 3;
    grid-row-end: 4;
}

/*=========== CABECALHO ===========*/

#cabecalho {
    display: flex;
    justify-content: space-between;
    background-color: blueviolet;
}

/*=========== MENU ===========*/

#divMenu {
    margin-top: auto;
    margin-bottom: auto;
    padding-top: 2vh;
    padding-right: 2vw;
    padding-bottom: 2vh;
    padding-left: 2vw;
}

#divMenu:hover {
    cursor: pointer;
}

#menu {
    list-style: none;
    padding-left: 5%;
    width: 100%;
    z-index: 1;
}

#menu>li {
    display: inline-block;
    position: relative;
}

#menu>li>a {
    display: block;
    text-decoration: none;
    background: black;
    color: white;
    font-size: 1rem;
    line-height: 1rem;
    padding: 0.8rem 2rem 0.8rem 2rem;
    text-align: center;
}

#menu>li>a:hover {
    background: dimgray;
}

#btnLivros {
    display: block;
    border: none;
    cursor: pointer;
    background: black;
    color: white;
    font-size: 1rem;
    line-height: 1rem;
    padding: 0.8rem 2rem 0.8rem 2rem;
}

#btnLivros:hover {
    background: dimgray;
}

#btnLivros::after {
    content: ' \25bc';
}

#btnLivros.ativo::after {
    content: ' \25b2';
}

#subMenuLivros {
    position: absolute;
    min-width: 15em;
    line-height: 1.5rem;
    font-size: 1rem;
    background: blueviolet;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
    border: 5px solid;
    border-radius: 5px;
    z-index: 2;
    /*==ANIMACAO==*/
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s;
}

#subMenuLivros.ativo {
    visibility: visible;
    opacity: 1;
}

#subMenuLivros>li>a:hover {
    background: dimgray;
}

#subMenuLivros a {
    display: block;
    text-decoration: none;
    color: white;
    padding: 0.5rem 0;
    border-block-start: 2px black;
    text-align: center;
}

#menuHamburguer {
    display: none;
}

/*=========== TITULO SITE ===========*/

#nomeSite {
    margin: auto;
    padding: 2%;
    color: white;
    font-weight: bolder;
    font-size: 1.5rem;
    text-shadow: 2px 2px 2px black;
    text-align: center;
    text-decoration: none;
}

#nomeSite:hover {
    color: khaki;
}

/*=========== CONTEUDO ===========*/

#btnTopo {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    height: 50px;
    width: 50px;
    border: none;
    background-color: red;
    color: white;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    font-size: 20px;
    /*=====*/
    opacity: 0.5;
    transition: opacity 0.5s;
}

#btnTopo:hover {
    opacity: 1;
}

/*=========== RODAPE ===========*/

#rodape {
    background-color: blueviolet;
    color: white;
}

#rodape>p {
    text-align: center;
    margin: 1%;
}

/*===================================================*/

/*===================================================*/

/*===================================================*/

@media screen and (max-width: 640px) {
    /*=========== SITE/GRID ===========*/
    #site {
        grid-template-rows: 1fr auto 0.25fr;
    }
    /*=========== CABEÇALHO ===========*/
    nav {
        position: absolute;
        z-index: 1;
        border: 5px solid;
        border-radius: 5px;
        box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.5);
        /**********/
        left: -500%;
        opacity: 0;
        -webkit-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
    }
    nav.ativo {
        opacity: 1;
        left: 0%;
    }
    #menu {
        padding: 0;
        margin: 0;
    }
    #menu>li {
        display: block;
    }
    #menuHamburguer {
        display: block;
    }
    .hamburger .line {
        width: 30px;
        height: 4px;
        background-color: white;
        display: block;
        margin-top: 6px;
        margin-bottom: 6px;
        -webkit-transition: all 0.3s ease-in-out;
        -o-transition: all 0.3s ease-in-out;
        transition: all 0.3s ease-in-out;
    }
    #menuHamburguer.ativo .line:nth-child(2) {
        opacity: 0;
    }
    #menuHamburguer.ativo .line:nth-child(1) {
        -webkit-transform: translateY(10px) rotate(45deg);
        -ms-transform: translateY(10px) rotate(45deg);
        -o-transform: translateY(10px) rotate(45deg);
        transform: translateY(10px) rotate(45deg);
    }
    #menuHamburguer.ativo .line:nth-child(3) {
        -webkit-transform: translateY(-10px) rotate(-45deg);
        -ms-transform: translateY(-10px) rotate(-45deg);
        -o-transform: translateY(-10px) rotate(-45deg);
        transform: translateY(-10px) rotate(-45deg);
    }
}